#ifndef SIP_WTSIPUNTILS_HPP__
#define SIP_WTSIPUNTILS_HPP__

//#include "WTResipDll/SipWTResipDllItf.hpp"
#include "WTResipDll/SipResipConfigure.hpp"
#include "WTResipDll/SipWtTypes.hpp"
#include "resip/stack/MethodTypes.hxx"
#include "resip/stack/NameAddr.hxx"
#include <string>
#include <list>

namespace wtsip{


class RESIP_PUBLIC CSipWtsipUntils
{
public:
    static bool StringSplit(const std::string& str, const std::string& splits, std::list<std::string>& list);

    static bool isEmpty(const std::string& str);

    static std::string& trim(std::string &str);

    static resip::MethodTypes tran2ResipMethod(const wtsip::EMethodTypes mth);

    static wtsip::EMethodTypes tran2WtMethod(const resip::MethodTypes mth);

    static bool tran2NameAddr(resip::NameAddr& dst, const SUri& src);

    static bool tran2SUri(SUri& dst, const resip::NameAddr& src);

    static bool tran2SUri(SUri& dst, const resip::Uri& src);

    static int getCodeByType(const ESipCodeType type);

    static ESipCodeType getTypeByCode(const int code);

    static const std::string& getReasonByType(const ESipCodeType type);

    static const std::string& getTransportName(const resip::TransportType type);

    static bool parseBody(std::string& type, std::string& subType, std::string& content, const resip::Contents* body);

public:

    static std::string s_Reasons[MAX_CODETYPE];

    static int s_Codes[MAX_CODETYPE];

};

}//namespace wtsip

#endif

